#ifndef __COMPLEX_H__
#define __COMPLEX_H__

#include <iostream>

using namespace std;

typedef float cType;

class Complex
{
    public:

        Complex();                      //  Default constructor

        Complex(const cType& _real, const cType& _img);
        Complex(cType _real);

        //~Complex();                   //  Default destructor


        //Complex(const Complex& other);  //  Copy constructor

        Complex& operator=(const Complex& _cmp);   //  Assignment operator
        Complex& operator=(cType _real);            //  Assignment operator for the real part

        Complex& operator+=(const Complex& _cmp);
        Complex& operator-=(const Complex& _cmp);
        Complex& operator*=(const Complex& _cmp);
        Complex& operator/=(const Complex& _cmp);

        friend ostream& operator<<(ostream& _os, const Complex& _cmp);
        friend istream& operator>>(istream& _is, Complex& _cmp);

        void SetReal(const cType& _real);
        void SetImg(const cType& _img);

        cType GetReal() const;
        cType GetImg() const;

        cType   Abs() const;
        cType   Norm() const;
        Complex Conj() const;

        bool operator==(const Complex& _cmp);
        bool operator!=(const Complex& _cmp);

    protected:
    private:
        cType m_real; //!< Member variable "m_real"
        cType m_imag; //!< Member variable "m_img"
};

ostream& operator<<(ostream& _os, const Complex& _cmp);
istream& operator<<(istream& _is, Complex& _cmp);

Complex operator+(const Complex& _cmp1, const Complex& _cmp2);
Complex operator-(const Complex& _cmp1, const Complex& _cmp2);
Complex operator*(const Complex& _cmp1, const Complex& _cmp2);
Complex operator/(const Complex& _cmp1, const Complex& _cmp2);



#endif // __COMPLEX_H__
